package com.heima.wemedia.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		//表示把自己定义的拦截器注册到springmvc拦截器中心，让springmvc承认
		registry.addInterceptor(new WmTokenInterceptor()).addPathPatterns("/**")
				.excludePathPatterns("/login/in");
	}
}
